Functions

Had to post a new thread, last one was full.

Is is possible to execute a function already on Doors by using a DXL command ?

Something like to specify the path of that function or maybe to start it directly from Doors

The function Export to Excel ?

Thanks
izzo - Fri Oct 22 09:43:56 EDT 2010

Re: Functions
Mathias Mamsch - Fri Oct 22 16:22:09 EDT 2010

You can execute the built in menus using

void callStdItem_ (MA_StdItem__)

 


as I learned from Pekka in this post.

All other scripts, whose menu items are not built into the DOORS client, but just some addon DXL, like the export script, can be called by doing an include:

 

 

 

#include <standard/export/office/excel.dxl>



You can also remote control the DXL dialogs, when you have the source by doing:



 

 

 

 

// make the export script not stop after show or block
void show(DB x) { realize x }
void block(DB x) { realize x }
 
#include <standard/export/office/word.dxl>
 
// virtually click the "export button"
doExport exportBox 
 
// get rid of the dialog box
if (!null exportBox) { destroy exportBox }



Hope this helps, regards, Mathias



 

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Re: Functions
izzo - Wed Oct 27 04:40:03 EDT 2010

Thanks Mat!!!

I found that in the DXL Help

void create(Module m,
Baseline b,
string annot)

Baseline nextMajor(string suffix)
Baseline nextMinor(string suffix)
Operation
Returns the next major or minor baseline, with or without a suffix.

Example
create(nextMajor, "alpha review")
create(nextMajor "A", "alpha review")

Does anyone have a more concrete explanation ? I have A baseline 3.0 of a a module and I want to create a 4.0 with a description.

Thanks

Re: Functions
izzo - Wed Oct 27 08:22:46 EDT 2010

izzo - Wed Oct 27 04:40:03 EDT 2010
Thanks Mat!!!

I found that in the DXL Help

void create(Module m,
Baseline b,
string annot)

Baseline nextMajor(string suffix)
Baseline nextMinor(string suffix)
Operation
Returns the next major or minor baseline, with or without a suffix.

Example
create(nextMajor, "alpha review")
create(nextMajor "A", "alpha review")

Does anyone have a more concrete explanation ? I have A baseline 3.0 of a a module and I want to create a 4.0 with a description.

Thanks

I Found something about that issue in the forum

But it is not clear :

: <Line:120> null Module parameter was passed into argument position 1
-I- DXL: execution halted

I have module m=current() on the top of my script
How to do if the creation of a baseline close the module ?

Re: Functions
llandale - Wed Oct 27 14:14:15 EDT 2010

izzo - Wed Oct 27 04:40:03 EDT 2010
Thanks Mat!!!

I found that in the DXL Help

void create(Module m,
Baseline b,
string annot)

Baseline nextMajor(string suffix)
Baseline nextMinor(string suffix)
Operation
Returns the next major or minor baseline, with or without a suffix.

Example
create(nextMajor, "alpha review")
create(nextMajor "A", "alpha review")

Does anyone have a more concrete explanation ? I have A baseline 3.0 of a a module and I want to create a 4.0 with a description.

Thanks

Not much time. They made a mistake using 'Baseline' to mean both an existing Baseline, such as your 3.0, and also an anticipated baseline, your 4.0. The nextMinor and nextMajor commands will get a potential Baseline handle. If the latest baseline is 3.1; nextMinor will return 3.2 and nextMajor return 4.0. The suffix command will create a baseline of 3.1 with the specified Suffix. Seems like you should follow suffix with bool baselineExists(Module,Baseline) to make sure your Suffix doesn't represent an existing baseline. If so, try a different suffix.

As for your other post, IIRC there was some wierd bug that the Baseline commands required that there be a current module, but it didn't have to be the one associated with the baseline. In this case, just set current = mod. You perhaps closed the 'current' module somewhere setting it to null.

  • Louie

Re: Functions
izzo - Thu Oct 28 04:19:20 EDT 2010

Thanks a lot